package org.secangkirkopipanas.gxtcore.server.service;

import java.util.List;

import org.secangkirkopipanas.gxtcore.server.domain.SystemApplicationTask;
import org.secangkirkopipanas.gxtcore.server.domain.SystemGroup;
import org.secangkirkopipanas.gxtcore.server.domain.SystemPermission;
import org.secangkirkopipanas.gxtcore.server.domain.SystemUser;

public interface ISystemPermissionService {
	
	public static final String NAME = "systemPermissionService";

	public SystemPermission get(SystemGroup group, SystemApplicationTask task);

	public List<SystemPermission> getForList(
			List<SystemApplicationTask> systemApplicationTaskList);

	public List<SystemPermission> getForList(SystemGroup systemGroup);

	public List<SystemPermission> getForList(SystemGroup group,
			List<SystemApplicationTask> systemApplicationTaskList);

	public void save(SystemPermission systemPermission);

	public void delete(SystemGroup systemGroup,
			SystemApplicationTask systemApplicationTask);

	public boolean isHasAccess(SystemUser user, SystemApplicationTask task);

	public void togglePermission(SystemGroup group, SystemApplicationTask task);

}